package com.bml.architect.consumer.service;

import com.bml.architect.DemoService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

//@EnableAutoConfiguration
public class CallBackDemoServiceConsumer {

    @Reference(version = "callback")
    private DemoService demoService;

    public static void main(String[] args) {
        ConfigurableApplicationContext ca = SpringApplication.run(CallBackDemoServiceConsumer.class);

        DemoService demoService = ca.getBean(DemoService.class);
        demoService.sayHello("bml","C1",new DemoListenerImpl());
        demoService.sayHello("dyq","C2",new DemoListenerImpl());
        demoService.sayHello("zhansan","C3",new DemoListenerImpl());

    }
}
